import 'dart:collection';

enum OptType {
  ///no parsing (use string as-is)
  string,

  ///on/off
  bool,

  ///simple number
  number,

  /// size, accepts (K)ilo, (M)ega, (G)iga, (T)era postfix
  size
}

class OptDescription {
  final String name;
  final OptType type;
  final String help;
  final dynamic defVal;
  const OptDescription(
      {required this.name,
      required this.type,
      required this.help,
      this.defVal});
}

final class Opts extends LinkedListEntry<Opts> {}

class Option {
  final String name;
  final String? impliedOptName;
  final bool mergeLists; /* Merge multiple uses of option into a single list? */
  final LinkedList<Opts> list = LinkedList();
  final List<OptDescription> desc;

  Option(
      {required this.name,
      this.impliedOptName,
      this.mergeLists = false,
      this.desc = const []});
}
